package com.hsnn.medstgmini.base.std.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.springframework.format.annotation.DateTimeFormat;

import com.hsnn.medstgmini.util.ParseDate;

/**
 * @category 企业资质实体类
 * @author 韩守松
 * @date 2015年8月21日
 */
@Entity
@Table(name = "std_compprofile")
public class StdCompprofile implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String compprofileId;// 企业资质ID
	private String compId;// 企业ID
	private String profileCode;// 资质编号
	private String profileName;// 企业资质名称
	private String profileType;// 企业资质类型（参考企业资质类型字典表，有"其他"类型）
	private Date profileStarttime;// 企业资质有效期始
	private String profileStarttimeStr;
	private Date profileEndtime;// 企业资质有效期止
	private String profileEndtimeStr;
	private String profilePicAddr;// 资质图片地址
	private String profilePicShortcutAddr;// 资质图片缩略图地址
	private Integer status;// 状态0.停用1.启用
	private String remarks;// 备注
	private String updUser;// 最后更新人
	private Date updDatetime;// 最后更新时间
	private Integer auditStatus; // 新增审核状态 (0:未审核，1：审核通过，2：审核不通过，3：未提交)
	private Date auditDatetime; // 审核时间
	private String auditRemark; // 审核备注
	private String auditUser; // 审核人员

	private String projCompprofileId;// 采购项目企业资质id
	private String complainRemark;// 澄清备注

	@Id
	@Column(name = "compprofile_id", length = 36)
	public String getCompprofileId() {
		return compprofileId;
	}

	public void setCompprofileId(String compprofileId) {
		this.compprofileId = compprofileId;
	}

	@Column(name = "comp_id", length = 36)
	public String getCompId() {
		return compId;
	}

	public void setCompId(String compId) {
		this.compId = compId;
	}

	@Column(name = "profile_code", length = 36)
	public String getProfileCode() {
		return profileCode;
	}

	public void setProfileCode(String profileCode) {
		this.profileCode = profileCode;
	}

	@Column(name = "profile_name", length = 36)
	public String getProfileName() {
		return profileName;
	}

	public void setProfileName(String profileName) {
		this.profileName = profileName;
	}

	@Column(name = "profile_type", length = 36)
	public String getProfileType() {
		return profileType;
	}

	public void setProfileType(String profileType) {
		this.profileType = profileType;
	}

	@Column(name = "profile_starttime", length = 36)
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	public Date getProfileStarttime() {
		return profileStarttime;
	}

	public void setProfileStarttime(Date profileStarttime) {
		this.profileStarttime = profileStarttime;
	}

	@Column(name = "profile_endtime", length = 36)
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	public Date getProfileEndtime() {
		return profileEndtime;
	}

	public void setProfileEndtime(Date profileEndtime) {
		this.profileEndtime = profileEndtime;
	}

	@Column(name = "profile_pic_addr", length = 36)
	public String getProfilePicAddr() {
		return profilePicAddr;
	}

	public void setProfilePicAddr(String profilePicAddr) {
		this.profilePicAddr = profilePicAddr;
	}

	@Column(name = "profile_pic_shortcut_addr", length = 36)
	public String getProfilePicShortcutAddr() {
		return profilePicShortcutAddr;
	}

	public void setProfilePicShortcutAddr(String profilePicShortcutAddr) {
		this.profilePicShortcutAddr = profilePicShortcutAddr;
	}

	@Column(name = "status", length = 36)
	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@Column(name = "remarks", length = 36)
	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	@Column(name = "upd_user", length = 36)
	public String getUpdUser() {
		return updUser;
	}

	public void setUpdUser(String updUser) {
		this.updUser = updUser;
	}

	@Column(name = "upd_datetime", length = 36)
	public Date getUpdDatetime() {
		return updDatetime;
	}

	public void setUpdDatetime(Date updDatetime) {
		this.updDatetime = updDatetime;
	}

	@Transient
	public String getProfileStarttimeStr() {
		if (null != profileStarttime) {
			profileStarttimeStr = ParseDate.parseShortFormat(profileEndtime);
		}
		return profileStarttimeStr;
	}

	public void setProfileStarttimeStr(String profileStarttimeStr) {
		this.profileStarttimeStr = profileStarttimeStr;
	}

	@Transient
	public String getProfileEndtimeStr() {
		if (null != profileEndtime) {
			profileEndtimeStr = ParseDate.parseShortFormat(profileEndtime);
		}
		return profileEndtimeStr;
	}

	public void setProfileEndtimeStr(String profileEndtimeStr) {
		this.profileEndtimeStr = profileEndtimeStr;
	}

	@Transient
	public String getProjCompprofileId() {
		return projCompprofileId;
	}

	public void setProjCompprofileId(String projCompprofileId) {
		this.projCompprofileId = projCompprofileId;
	}

	@Transient
	public String getComplainRemark() {
		return complainRemark;
	}

	public void setComplainRemark(String complainRemark) {
		this.complainRemark = complainRemark;
	}

	@Column(name = "audit_status")
	public Integer getAuditStatus() {
		return auditStatus;
	}

	public void setAuditStatus(Integer auditStatus) {
		this.auditStatus = auditStatus;
	}

	@Column(name = "audit_datetime")
	public Date getAuditDatetime() {
		return auditDatetime;
	}

	public void setAuditDatetime(Date auditDatetime) {
		this.auditDatetime = auditDatetime;
	}

	@Column(name = "audit_remark")
	public String getAuditRemark() {
		return auditRemark;
	}

	public void setAuditRemark(String auditRemark) {
		this.auditRemark = auditRemark;
	}

	@Column(name = "audit_user")
	public String getAuditUser() {
		return auditUser;
	}

	public void setAuditUser(String auditUser) {
		this.auditUser = auditUser;
	}

}
